import type { AppRouteModule } from '/@/router/types';
import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const logisticsManagement: AppRouteModule = {
  path: '/logisticsManagement',
  name: 'logisticsManagement',
  component: LAYOUT,
  redirect: '/logisticsManagement/new',
  meta: {
    icon: 'ion:grid-outline',
    title: t('routes.dashboard.logisticsManagement'),
  },
  children: [
    {
      path: 'new',
      name: 'new',
      component: () => import('/@/views/logisticsManagement/new.vue'),
      meta: {
        title: t('routes.dashboard.new'),
      },
    },
    {
      path: 'demo',
      name: 'demo',
      component: () => import('/@/views/logisticsManagement/demo.vue'),
      meta: {
        title: t('routes.dashboard.newTow'),
      },
    },
    {
      path: 'research',
      name: 'research',
      component: () => import('/@/views/logisticsManagement/research.vue'),
      meta: {
        title: t('routes.dashboard.research'),
        icon: 'ant-design:copyright-outlined',
      },
      children: [
        {
          path: 'seeOrder',
          name: 'seeOrder',
          component: () => import('/@/views/logisticsManagement/order/seeOrder.vue'),
          meta: {
            title: t('routes.dashboard.newPage'),
            icon: 'ant-design:copyright-outlined',
          },
        },
      ],
    },
    {
      path: 'orderManage',
      name: 'orderManage',
      component: () => import('/@/views/logisticsManagement/orderManage/index.vue'),
      meta: {
        title: t('routes.logisticsManagement.orderManage'),
      },
      children: [
        {
          path: 'newOrder',
          name: 'newOrder',
          component: () => import('/@/views/logisticsManagement/orderManage/newOrder.vue'),
          meta: {
            title: t('routes.logisticsManagement.newOrder'),
            // 层级模式:路由定位父级
            currentActiveMenu: '/logisticsManagement/orderManage',
          },
        },
        {
          path: 'seeOrder',
          name: 'seeOrder',
          component: () => import('/@/views/logisticsManagement/orderManage/seeOrder.vue'),
          meta: {
            title: t('routes.logisticsManagement.seeOrder'),
            // 层级模式:路由定位父级
            currentActiveMenu: '/logisticsManagement/orderManage',
          },
        },
      ],
    },
  ],
};

export default logisticsManagement;
